cc.Class({
    extends: cc.Component,

    properties: {
        head:cc.Sprite,
        scoreLabel:cc.Label,
    },

    setAttr:function(url,score)
    {
        this.scoreLabel.string = score;
        cc.loader.load(url,function (err, texture) {
            if (err == null) {
                var frame=new cc.SpriteFrame(texture);
                this.head.getComponent(cc.Sprite).spriteFrame = frame;
            }
        }.bind(this));
    }

});
